import PromptInfo from "../utils/notification.js";

export const useCreate=(createModel,createApi,hideDialog,emmit)=>{
    const create=()=>{
        createApi(createModel.value).then(()=>{
            hideDialog();
            PromptInfo.success('创建成功');
            emmit('create-success')
        })
    }
    return{
        create
    }
}